import { http } from '@/utils/http'

// 新增
export const appAdd = (data?: object) => {
  return http.request('post', '/app/app', { data })
}
// 编辑
export const costMgtUpdate = (data?: object) => {
  return http.request('post', '/app/update', { data })
}

// 列表
export const getList = (params?: object) => {
  return http.get<{}, HttpPaginationResponse>('/manage/apiApproveRecord/apiApproveRecords', {
    params,
  })
}
// 列表
export const getApiPublishList = (params?: object) => {
  return http.get<{}, HttpPaginationResponse>('/manage/apiApproveRecord/apiPublishApproveRecords', {
    params,
  })
}
// 详情信息
export const getDetail = (params?: number) => {
  return http.request('get', '/manage/approve/apiApplyInfo', {
    params: { applyId: params },
  })
}
// 删除
export const del = (params?: object) => {
  return http.request('delete', `/manage/apiApproveRecord/${params}`)
}
// 接口审批
export const approve = (params?: object) => {
  return http.request('put', '/manage/approve/approve', { params })
}
